﻿using K9Nano.Dependency;
using K9Nano.Events;
using Microsoft.Extensions.Logging;

namespace AllInOneApiTest.Events
{
    public class EventTestDataHandler : IEventHandler<EventTestData>, IScopedDependency
    {
        private readonly ILogger _logger;

        public EventTestDataHandler(ILoggerFactory loggerFactory)
        {
            _logger = loggerFactory.CreateLogger(nameof(EventTestDataHandler));
        }

        public void HandleEvent(EventTestData eventData)
        {
            _logger.LogInformation(eventData.Value);
        }
    }
}